from socket import *
from select import select

if __name__ == "__main__":
    # 做几个IO用作监控
    s = socket()
    s.bind(('0.0.0.0', 8888))
    s.listen(3)

    fd = open('log.txt', 'a+')

    rs, ws, xs = select([s], [fd], [])

    print("rs", rs)
    print("ws", ws)
    print("xs", xs)
